package com.by.controller;

import com.by.common.bean.ResultBean;
import com.by.common.controller.BaseController;
import com.by.service.GoodsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author ServivE
 * @version 0.1
 * @className GoodsController
 * @description
 * @date 2024/10/24 13:55
 * @since jdk17
 */
@RestController
@RequestMapping("api")
@Api(tags = "商品管理")
public class GoodsController extends BaseController {

    @Autowired
    GoodsService goodsService;

    @GetMapping("/goods")
    @ApiOperation("秒杀列表")
    public ResultBean query() {
        List<Map> list = goodsService.query();
        return success("秒杀列表",list);
    }
}
